
<%@ include file="parsebooks.jsp" %>

<c:if test="${param.bookId != null}">
  <c:set var="bid" value="${param.bookId}"/>

  <x:set var="abook" select="$applicationScope:booklist/books/book[@id=$param:bookId]" />
  <h2><x:out select="$abook/title"/></h2>

    &nbsp;<fmt:message key="By"/> <em><x:out select="$abook/firstname"/> <x:out select="$abook/surname"/></em>&nbsp;&nbsp;
    (<x:out select="$abook/year"/>)<br> &nbsp; <br>
    <h4><fmt:message key="Critics"/></h4>
    <blockquote><x:out select="$abook/description"/></blockquote>

    <c:set var="price">
      <x:out select="$abook/price"/>
    </c:set>
    <h4><fmt:message key="ItemPrice"/>: <fmt:formatNumber value="${price}" type="currency"/>  </h4>

  <c:url var="url" value="/bookcatalog" >
    <c:param name="Add" value="${bid}" />
  </c:url> 
  <p><strong><a href="${url}"><fmt:message key="CartAdd"/></a>&nbsp; &nbsp; &nbsp;</strong>
</c:if>

<c:url var="url" value="/bookcatalog" >
  <c:param name="Add" value="" />
</c:url>
<strong><a href="${url}"><fmt:message key="ContinueShopping"/></a></strong>
